<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModifyUser.ascx.cs" Inherits="forums_controls_administration_ModifyUser" %>
<asp:Panel runat="server" ID="pnlUpdateUser" Width="100%" DefaultButton="btnSave">
    <asp:Panel runat="server" ID="pnlProfileSaved" EnableViewState="false" Visible="false" Width="100%">
        <p style="color : #FF00FF;">
            Profile successfully changed :)
        </p>
    </asp:Panel>
    <fieldset>
        <legend>
            User profile: <asp:Literal runat="server" ID="lblUsername" Text='[Username]' />
        </legend>
        <p>
            Username:
            <asp:TextBox runat="server" ID="txtUsername"
                Text='' ValidationGroup="UserProfile" /> 
            <asp:RequiredFieldValidator ID="valUsernameRequired" runat="server" ErrorMessage="Username is a required field." ValidationGroup="UserProfile" ControlToValidate="txtUsername"></asp:RequiredFieldValidator>
            <asp:CustomValidator ID="valUsernameTaken" runat="server" ControlToValidate="txtUsername"
                EnableClientScript="False" ErrorMessage="Username is already taken." OnServerValidate="CheckUsername" ValidationGroup="UserProfile"></asp:CustomValidator></p>
        <fieldset>
            <legend>Change Password:</legend>
            <asp:Panel runat="server" ID="pnlChangePassword" Width="100%" DefaultButton="btnUpdatePassword">
                <asp:Panel runat="server" ID="pnlPasswordChanged" EnableViewState="false" Visible="false" Width="100%">
                    <p style="color : #FF00FF;">
                        Password successfully changed :)
                    </p>
                </asp:Panel>
                <p>
                    New password:
                    <asp:TextBox runat="server" ID="txtPassword1"
                        TextMode="password" ValidationGroup="UserPassword" />
                    <asp:RequiredFieldValidator ID="valPassword1Required" runat="server" ControlToValidate="txtPassword1"
                        ErrorMessage="New password is a required field, assface." ValidationGroup="UserPassword"></asp:RequiredFieldValidator>
                </p>
                <p>
                    Confirm password:
                    <asp:TextBox runat="server" ID="txtPassword2"
                        TextMode="password" ValidationGroup="UserPassword" />
                    <asp:RequiredFieldValidator ID="valPassword2Required" runat="server" ControlToValidate="txtPassword2"
                        ErrorMessage="Confirm the password, dickmunch." ValidationGroup="UserPassword"></asp:RequiredFieldValidator>
                </p>
                <p>
                    <asp:Button ID="btnUpdatePassword" runat="server" OnClick="btnUpdatePassword_Click"
                        Text="Update Password" ValidationGroup="UserPassword" />
                    <asp:CompareValidator ID="valPasswordsMatch" runat="server" ControlToCompare="txtPassword2"
                        ControlToValidate="txtPassword1" ErrorMessage="Passwords don't match, what the fuck!"
                        ValidationGroup="UserPassword"></asp:CompareValidator>
                </p>
            </asp:Panel>
        </fieldset>
        <p>
            <asp:CheckBox runat="server" ID="chkAllowAvatar" Text="Allow Avatar" />
        </p>
        <p>
            <asp:CheckBox runat="server" ID="chkAllowUserTitle" Text="Allow Custom Title" />
        </p>
        <p>
            <asp:CheckBox runat="server" ID="chkAllowSignature" Text="Allow Signature" />
        </p>
        <p>
            <asp:CheckBox runat="server" ID="chkAllowPublicAdmin" Text="Allow Participation in Public Admin" />
        </p>
        <p>
            Email:
            <asp:TextBox runat="server" ID="txtEmail"
                Text='' ValidationGroup="UserProfile" />
        </p>
        <p>
            Location:
            <asp:TextBox runat="server" ID="txtLocation"
                Text='' ValidationGroup="UserProfile" />
        </p>
        
        <p>
            Website:
            <asp:TextBox runat="server" ID="txtWebsite"
                Text='' ValidationGroup="UserProfile" />
        </p>
        <p>
            Occupation:
            <asp:TextBox runat="server" ID="txtOccupation"
                Text='' ValidationGroup="UserProfile" />
        </p>
        
        
        
        <p>
            Signature:<br />
            <asp:TextBox runat="server" ID="txtSignature" Rows="4" Columns="60" TextMode="MultiLine" />
        </p>
        <p>
            Bio:<br />
            <asp:TextBox runat="server" ID="txtBio" Rows="4" Columns="60" TextMode="MultiLine" />
        </p>
        <p>
            Interests:<br />
            <asp:TextBox runat="server" ID="txtInterests" Rows="4" Columns="60" TextMode="MultiLine" />
        </p>
        
        <asp:Panel runat="server" ID="pnlUserlevel" Width="100%">
            <p>
                User level: <asp:DropDownList runat="server" ID="ddlUserLevel">
                    <asp:ListItem Value="1">Member</asp:ListItem>
                    <asp:ListItem Value="2">Moderator</asp:ListItem>
                    <asp:ListItem Value="3">Super Moderator</asp:ListItem>
                    <asp:ListItem Value="4">Administrator</asp:ListItem>
                    <asp:ListItem Value="-1">Banned</asp:ListItem>
                </asp:DropDownList>
            </p>
        </asp:Panel>
        
        <p>
            <asp:Button runat="server" ID="btnSave"
                Text="Save Changes" OnClick="btnSave_Click" ValidationGroup="UserProfile" />
        </p>
        <hr />
        <p>
            <asp:Button ID="btnBan" runat="server" Text="Ban User" OnClick="btnBan_Click" />
        </p>
        <p>
            If this user is a spammer then you can ban a user and remove all of their posts
            by clicking this button:<br />
            <asp:Button runat="server" ID="btnAnnihilate"
                Text="Annihilate Spammer" OnClick="btnAnnihilate_Click" /><br />
            <asp:Label runat="server" ID="lblAnnihilate"
                Visible="false"
                EnableViewState="false"
                Text="All posts by user have been removed." />
        </p>
    </fieldset>
</asp:Panel>